package cn.edu.xaut.servlet;

import cn.edu.xaut.db.ConnDB;

import java.sql.*;

public class test1 {

    public static void main(String[] args) {

        try {
            String url = "jdbc:mysql://localhost:3306/dbmis?serverTimezone=UTC";
            Class.forName("com.mysql.cj.jdbc.Driver");
            Connection con = DriverManager.getConnection(url, "root", "root");
            Statement stmt = con.createStatement();
            String sql = "select * from dbmis.tb_student";
            ResultSet rs = stmt.executeQuery(sql);
            rs.getRow();
            rs.close();
            stmt.close();
            con.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
